Skip to content

Conversation

@masseyke
Copy link
Member

This addresses a couple of bugs in multiproject handling that were raised here: #130042 (comment)

@masseyke masseyke requested a review from nielsbauman June 27, 2025 18:04
@elasticsearchmachine elasticsearchmachine added the Team:Data Management Meta label for data/management team label Jun 27, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-data-management (Team:Data Management)

);
return;
}
ProjectId projectId = projectResolver.getProjectId();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty small nit, but we usually prefer to resolve the project ID only once, to avoid any confusion whatsoever (and to save a thread context lookup, although that's pretty minor).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm only getting the project ID once, right? Where is the other time?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I meant "using the project resolver", as the project resolver is getting the project ID from thread context. I'm referring to projectResolver.getProjectMetadata(state) above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, ok. I've changed that now. I never thought of projectId as something I need to be careful about accessing. It's possible there are other places where I'm accessing it frequently.

@masseyke masseyke requested a review from nielsbauman June 27, 2025 18:27
Copy link
Contributor

@nielsbauman nielsbauman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the iterations, Keith!

@masseyke masseyke merged commit 48f60b6 into elastic:main Jun 27, 2025
32 checks passed
@masseyke masseyke deleted the minor-multiproject-fix branch June 27, 2025 22:18
mridula-s109 pushed a commit to mridula-s109/elasticsearch that referenced this pull request Jul 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Data streams Data streams and their lifecycles >non-issue Team:Data Management Meta label for data/management team v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants